Optimal. Leaf size=123 \[ \frac{(6 A-29 C) \tan (c+d x)}{15 d \left (a^3 \sec (c+d x)+a^3\right )}+\frac{C \tanh ^{-1}(\sin (c+d x))}{a^3 d}-\frac{(A+C) \tan (c+d x) \sec ^2(c+d x)}{5 d (a \sec (c+d x)+a)^3}-\frac{(3 A-7 C) \tan (c+d x)}{15 a d (a \sec (c+d x)+a)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.330017, antiderivative size = 123, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 33, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.152, Rules used = {4085, 4008, 3998, 3770, 3794} \[ \frac{(6 A-29 C) \tan (c+d x)}{15 d \left (a^3 \sec (c+d x)+a^3\right )}+\frac{C \tanh ^{-1}(\sin (c+d x))}{a^3 d}-\frac{(A+C) \tan (c+d x) \sec ^2(c+d x)}{5 d (a \sec (c+d x)+a)^3}-\frac{(3 A-7 C) \tan (c+d x)}{15 a d (a \sec (c+d x)+a)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4085
Rule 4008
Rule 3998
Rule 3770
Rule 3794
Rubi steps
\begin{align*} \int \frac{\sec ^2(c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx &=-\frac{(A+C) \sec ^2(c+d x) \tan (c+d x)}{5 d (a+a \sec (c+d x))^3}-\frac{\int \frac{\sec ^2(c+d x) (-a (3 A-2 C)-5 a C \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx}{5 a^2}\\ &=-\frac{(A+C) \sec ^2(c+d x) \tan (c+d x)}{5 d (a+a \sec (c+d x))^3}-\frac{(3 A-7 C) \tan (c+d x)}{15 a d (a+a \sec (c+d x))^2}+\frac{\int \frac{\sec (c+d x) \left (2 a^2 (3 A-7 C)+15 a^2 C \sec (c+d x)\right )}{a+a \sec (c+d x)} \, dx}{15 a^4}\\ &=-\frac{(A+C) \sec ^2(c+d x) \tan (c+d x)}{5 d (a+a \sec (c+d x))^3}-\frac{(3 A-7 C) \tan (c+d x)}{15 a d (a+a \sec (c+d x))^2}+\frac{(6 A-29 C) \int \frac{\sec (c+d x)}{a+a \sec (c+d x)} \, dx}{15 a^2}+\frac{C \int \sec (c+d x) \, dx}{a^3}\\ &=\frac{C \tanh ^{-1}(\sin (c+d x))}{a^3 d}-\frac{(A+C) \sec ^2(c+d x) \tan (c+d x)}{5 d (a+a \sec (c+d x))^3}-\frac{(3 A-7 C) \tan (c+d x)}{15 a d (a+a \sec (c+d x))^2}+\frac{(6 A-29 C) \tan (c+d x)}{15 d \left (a^3+a^3 \sec (c+d x)\right )}\\ \end{align*}
Mathematica [A] time = 1.58916, size = 236, normalized size = 1.92 \[ -\frac{\cos \left (\frac{1}{2} (c+d x)\right ) \sec (c+d x) \left (A+C \sec ^2(c+d x)\right ) \left (\sec \left (\frac{c}{2}\right ) \left (15 (A-5 C) \sin \left (c+\frac{d x}{2}\right )-15 A \sin \left (c+\frac{3 d x}{2}\right )-3 A \sin \left (2 c+\frac{5 d x}{2}\right )-5 (3 A-29 C) \sin \left (\frac{d x}{2}\right )+95 C \sin \left (c+\frac{3 d x}{2}\right )-15 C \sin \left (2 c+\frac{3 d x}{2}\right )+22 C \sin \left (2 c+\frac{5 d x}{2}\right )\right )+240 C \cos ^5\left (\frac{1}{2} (c+d x)\right ) \left (\log \left (\cos \left (\frac{1}{2} (c+d x)\right )-\sin \left (\frac{1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )\right )\right )}{15 a^3 d (\sec (c+d x)+1)^3 (A \cos (2 (c+d x))+A+2 C)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.059, size = 139, normalized size = 1.1 \begin{align*} -{\frac{A}{20\,d{a}^{3}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{5}}-{\frac{C}{20\,d{a}^{3}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{5}}-{\frac{C}{3\,d{a}^{3}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{3}}+{\frac{A}{4\,d{a}^{3}}\tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) }-{\frac{7\,C}{4\,d{a}^{3}}\tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) }-{\frac{C}{d{a}^{3}}\ln \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) -1 \right ) }+{\frac{C}{d{a}^{3}}\ln \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) +1 \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.957302, size = 225, normalized size = 1.83 \begin{align*} -\frac{C{\left (\frac{\frac{105 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac{20 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac{3 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}}{a^{3}} - \frac{60 \, \log \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{3}} + \frac{60 \, \log \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{3}}\right )} - \frac{3 \, A{\left (\frac{5 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac{\sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}\right )}}{a^{3}}}{60 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.502743, size = 481, normalized size = 3.91 \begin{align*} \frac{15 \,{\left (C \cos \left (d x + c\right )^{3} + 3 \, C \cos \left (d x + c\right )^{2} + 3 \, C \cos \left (d x + c\right ) + C\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 15 \,{\left (C \cos \left (d x + c\right )^{3} + 3 \, C \cos \left (d x + c\right )^{2} + 3 \, C \cos \left (d x + c\right ) + C\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \,{\left ({\left (3 \, A - 22 \, C\right )} \cos \left (d x + c\right )^{2} + 3 \,{\left (3 \, A - 17 \, C\right )} \cos \left (d x + c\right ) + 3 \, A - 32 \, C\right )} \sin \left (d x + c\right )}{30 \,{\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{A \sec ^{2}{\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec{\left (c + d x \right )} + 1}\, dx + \int \frac{C \sec ^{4}{\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec{\left (c + d x \right )} + 1}\, dx}{a^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.25467, size = 177, normalized size = 1.44 \begin{align*} \frac{\frac{60 \, C \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right )}{a^{3}} - \frac{60 \, C \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right )}{a^{3}} - \frac{3 \, A a^{12} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 3 \, C a^{12} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 20 \, C a^{12} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 15 \, A a^{12} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 105 \, C a^{12} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{a^{15}}}{60 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]